home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-11-22 | 709 b | 31 lines | [TEXT/ALFA] |
- # Load this file to create a heirarchical fileset menu that allows you
- # to open any file in any fileset.
- #
- # Doesn't bother trying to specialcase names or pathnames that have
- # non-alphanumeric characters in them.
-
- proc filesetProc {menu item} {
- global fileSets
- if {[set match [lsearch $fileSets($menu) *$item]] >= 0} {
- edit [lindex $fileSets($menu) $match]
- }
- }
-
- proc makeFilesetMenu {} {
- global fileSets
-
- foreach f [lsort [array names fileSets]] {
- if {$f == "Help"} continue
- set menu {}
- foreach m $fileSets($f) {
- lappend menu [file tail $m]
- }
- lappend sets [list menu -m -n $f -p filesetProc $menu]
- }
- menu -m -n FileSets -p filesetProc $sets
- insertMenu FileSets
- }
-
-
- makeFilesetMenu
-